public class test19_找水仙花数_测试 {
    //寻找三位水仙花数_代码测试
    public static void main(String[] args) {
        int a = 0, b = 0, c = 0, d = 0, e = 0;
        for (int num = 100;num <= 1000;num++) {
            a = num;
            b = a % 10;
            c = (a / 10) % 10;
            d = (a / 100) % 10;
            e = b*b*b + c*c*c + d*d*d;
            if (e == a) {
                System.out.println(num);
            }
        }
    }
}
